/*
 * author      : 吴中勤 
 * date        : 2018/9/26
 * description : moby订单场景, 不要修改, 已经录入到数据库
 */

package com.deepexi.adapter.facade.moby;

public enum MobyOrderLineSenseEnum {

            PRODUCT_TYPE_NEW_CAR("LSC0100", "NEW_CAR",       "新车类型"),
           PRODUCT_TYPE_BOUTIQUE("LSC0200", "BOUTIQUE",      "精品类型"),
      PRODUCT_TYPE_FREE_BOUTIQUE("LSC0201", "FREE_BOUTIQUE", "免费精品类型"),
           PRODUCT_TYPE_MAINTAIN("LSC0300", "MAINTAIN",      "保养类型"),
      FREE_MAINTAIN_PRODUCT_TYPE("LSC0301", "FREE_MAINTAIN", "免费保养类型"),
        INSTALLMENT_PRODUCT_TYPE("LSC0400", "INSTALLMENT",   "分期类型"),
            SERVICE_PRODUCT_TYPE("LSC0500", "SERVICE",       "服务类型"),
          INSURANCE_PRODUCT_TYPE("LSC0600", "INSURANCE",     "保险类型"),

//
    ;

    public final String code;
    public final String name;
    public final String desc;

    MobyOrderLineSenseEnum(String code, String name, String desc) {
        this.code = code;
        this.name = name;
        this.desc = desc;
    }

    /** name.equals(aString) */
    public boolean nameEquals(String name) {
        return this.name.equals(name);
    }

    public MobyOrderLineSenseEnum getByName(String name) {
        for (MobyOrderLineSenseEnum e : MobyOrderLineSenseEnum.values()) {
            if (e.name.equals(name)) return e;
        }
        return null;
    }
}
